<h1 align="center">Set Page Title</h1>
<div align="center">
  <% data = ((YAML::load_file(@file_path) rescue nil)|| {})
     key = "#{params[:controller]}\##{params[:action]}"
     value = data[key]
  %>

  <%= form_tag ('/title/app/save'), :remote => true do %>
      <%= label_tag :set_controller %>
      <%= text_field_tag :set_controller, params[:controller] %>
      <%= label_tag :set_action %>
      <%= text_field_tag :set_action, params[:action] %>
      <%= label_tag :title %>
      <% if value.present? %>
          <%= text_field_tag :title, value %>
      <% else %>
          <%= text_field_tag :title, params[:title] %>
      <% end %>
      <%= submit_tag "Save Title", class: "btn btn-large btn-primary" %>
  <% end %>
  <%= debug (params) if Rails.env.development? %>

</div>